package com.timesheet.gui.tasktracker.providers;

import com.timesheet.gui.tasktracker.viewmodel.TaskTrackerViewModelContainer;

import org.eclipse.jface.viewers.IStructuredContentProvider;
import org.eclipse.jface.viewers.Viewer;

public class TaskTrackerContentProvider implements IStructuredContentProvider {

	@Override
	public void dispose() {

	}

	@Override
	public void inputChanged(Viewer arg0, Object arg1, Object arg2) {

	}

	@Override
	public Object[] getElements(Object arg0) {
		if (arg0 instanceof TaskTrackerViewModelContainer) {
			TaskTrackerViewModelContainer container = (TaskTrackerViewModelContainer) arg0;
			return container.getList().toArray();
		}
		return null;
	}

}
